#include "gameline.h"

// constructor - currently limiting gameMoveDepth to 40
GameLine::GameLine()
{
    plyAhead = 0;
    int depth= 40;
    gameMove.clear(); gameMove.resize(depth+1);
    sideToMove.clear(); sideToMove.resize(depth+1);
    enPassantSquare.clear(); enPassantSquare.resize(depth+1);
    wCanCastle00.clear(); wCanCastle00.resize(depth+1);
    wCanCastle000.clear(); wCanCastle000.resize(depth+1);
    bCanCastle00.clear(); bCanCastle00.resize(depth+1);
    bCanCastle000.clear(); bCanCastle000.resize(depth+1);

    enPassantSquare.at(0) = -1;
}

void GameLine::init(size_t depth, int eps) {
    plyAhead = 0;
    gameMove.clear(); gameMove.resize(depth+1);
    sideToMove.clear(); sideToMove.resize(depth+1);
    enPassantSquare.clear(); enPassantSquare.resize(depth+1);
    wCanCastle00.clear(); wCanCastle00.resize(depth+1);
    wCanCastle000.clear(); wCanCastle000.resize(depth+1);
    bCanCastle00.clear(); bCanCastle00.resize(depth+1);
    bCanCastle000.clear(); bCanCastle000.resize(depth+1);

    enPassantSquare.at(0) = eps;
}

// constructor
//// setting all vectors to required size (depth+1)
//GameLine::GameLine(size_t depth)
//{
//    plyAhead = 0;

//    gameMove.clear(); gameMove.resize(depth+1);
//    sideToMove.clear(); sideToMove.resize(depth+1);
//    enPassantSquare.clear(); enPassantSquare.resize(depth+1);
//    wCanCastle00.clear(); wCanCastle00.resize(depth+1);
//    wCanCastle000.clear(); wCanCastle000.resize(depth+1);
//    bCanCastle00.clear(); bCanCastle00.resize(depth+1);
//    bCanCastle000.clear(); bCanCastle000.resize(depth+1);

//}
